import Axios from '@/util/http'
import api from '@/config/api'

export default {
  // 获取分类菜单列表
  getCategory ({dispatch, commit, state}, params) {
    return new Promise(resolve => {
      Axios.post(api + '/pc/home/queryProductCategoryAndBrandAndStore', {}).then(res => {
        if (res.responseCode === '0000') {
          commit('setCategoryList', res.data)
        }
        return resolve()
      })
    })
  }
}
